package org.ytor.core.sqlflow.dsl.expr.node.support;

import lombok.AllArgsConstructor;
import org.ytor.core.sqlflow.dsl.expr.node.ExprNode;

/**
 * created by yangtong on 2025/8/6 19:47:48
 * <br/>
 * 字符串、数字、null、true/false/empty等字面量节点
 */
@AllArgsConstructor
public class LiteralNode implements ExprNode {

    public Object value;

    public String getType() {
        return switch (value) {
            case null -> "null";
            case String _ -> "string";
            case Number _ -> "number";
            case Boolean _ -> "boolean";
            default -> "unknown";
        };
    }
}
